/*
 * @Author: nqx2007 fenglimima334@163.com
 * @Date: 2023-12-04 18:00:36
 * @LastEditors: nqx2007 fenglimima334@163.com
 * @LastEditTime: 2023-12-04 18:44:26
 * @FilePath: /operator-manager/src/pages/Access/index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { Access, useAccess } from '@umijs/max';
import { Button } from 'antd';

const AccessPage: React.FC = () => {
  const access = useAccess();
  return (
    <div>
      <Access accessible={access.canSeeAdmin}>
        <Button>只有 Admin 可以看到这个按钮</Button>
      </Access>
    </div>
  );
};

export default AccessPage;
